/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.dbsti.testemaven;

/**
 *
 * @author Bruno
 */
public class Fibonacci {

      int calcular (int i){
          if(i < 0){
          
          throw new IllegalArgumentException("não eh possivel calcular numeros negativos");
          }
          if (i == 0 || i == 1){
            return i;
          }
          return calcular (i-1) + calcular (i-2);
        }
    }

